<?php
/**
 * @package    JWPBlog
 * @author David Neimeyer davidneimeyer@gmail.com
 * @link http://indie-bookstore.googlecode.com/
 * @license    GNU/GPL v.2
 */

/** access via Joomla! index only */
defined('_JEXEC') or die('Restricted Access');//1.5

$basiccontroller = JPATH_COMPONENT.DS.'controller.php';
		
require_once ($basiccontroller);
require_once (JPATH_COMPONENT.DS.'models'.DS.'default.php');
// Require specific controller if requested
if($ucontroller = JRequest::getWord('controller', 'application')) {
	$path = JPATH_COMPONENT.DS.'controllers'.DS.$ucontroller.'.php';
	if (file_exists($path)) {
		require_once ($path);
	} else {
		$ucontroller = '';
	}
}
	// Create the controller
	$classname	= 'JWPBlogController'.ucfirst($ucontroller);
	$controller	= new $classname( );
	$controller->execute( JRequest::getCmd('task'));
	$controller->redirect();
?>